import { AxiosAccount } from '../utils/http/request';

//贴子类型管理
enum typeApi {
  list = '/bbs/type/list',
  add = '/bbs/type/add',
  detail = '/bbs/type/detail',
  edit = '/bbs/type/edit',
  delete = '/bbs/type/delete',
}

//贴子管理
enum listApi {
  list = '/bbs/bbs/list',
  add = '/bbs/bbs/add',
  detail = '/bbs/bbs/detail',
  edit = '/bbs/bbs/edit',
  delete = '/bbs/bbs/delete',
  audit = '/bbs/bbs/audit',
}

//贴子评论管理
enum commentApi {
  list = '/bbs/comment/list',
  delete = '/bbs/comment/delete',
}

//贴子点赞管理
enum likeApi {
  list = '/bbs/like/list',
  delete = '/bbs/like/delete',
}

//贴子类型列表
export const typeList = (data: any) =>
  AxiosAccount.request({
    url: typeApi.list,
    method: 'post',
    data,
  });
//贴子类型添加
export const typeAdd = (data: any) =>
  AxiosAccount.request({
    url: typeApi.add,
    method: 'post',
    data,
  });
//贴子类型详情
export const typeDetail = (data: any) =>
  AxiosAccount.request({
    url: typeApi.detail,
    method: 'post',
    data,
  });
//贴子类型修改
export const typeEdit = (data: any) =>
  AxiosAccount.request({
    url: typeApi.edit,
    method: 'post',
    data,
  });
//贴子类型删除
export const typeDelete = (data: any) =>
  AxiosAccount.request({
    url: typeApi.delete,
    method: 'post',
    data,
  });

//贴子列表
export const listList = (data: any) =>
  AxiosAccount.request({
    url: listApi.list,
    method: 'post',
    data,
  });
//贴子添加
export const listAdd = (data: any) =>
  AxiosAccount.request({
    url: listApi.add,
    method: 'post',
    data,
  });
//贴子详情
export const listDetail = (data: any) =>
  AxiosAccount.request({
    url: listApi.detail,
    method: 'post',
    data,
  });
//贴子修改
export const listEdit = (data: any) =>
  AxiosAccount.request({
    url: listApi.edit,
    method: 'post',
    data,
  });
//贴子删除
export const listDelete = (data: any) =>
  AxiosAccount.request({
    url: listApi.delete,
    method: 'post',
    data,
  });
//贴子审核
export const listAudit = (data: any) =>
  AxiosAccount.request({
    url: listApi.audit,
    method: 'post',
    data,
  });

//贴子评论列表
export const commentList = (data: any) =>
  AxiosAccount.request({
    url: commentApi.list,
    method: 'post',
    data,
  });
//贴子评论删除
export const commentDelete = (data: any) =>
  AxiosAccount.request({
    url: commentApi.delete,
    method: 'post',
    data,
  });

//贴子点赞列表
export const likeList = (data: any) =>
  AxiosAccount.request({
    url: likeApi.list,
    method: 'post',
    data,
  });
//贴子点赞删除
export const likeDelete = (data: any) =>
  AxiosAccount.request({
    url: likeApi.delete,
    method: 'post',
    data,
  });
